Request enough height to fit all children in a single line instead of
requesting 0.
https://bugzilla.gnome.org/show_bug.cgi?id=679168
_getPreferredHeight: function (grid, forWidth, alloc) {
let children = this._getVisibleChildren();
- let [nColumns, usedWidth] = this._computeLayout(forWidth);
+ let nColumns;
+ if (forWidth < 0)
+ nColumns = children.length;
+ else
+ nColumns = this._computeLayout(forWidth)[0];
let nRows;
if (nColumns > 0)
nRows = Math.ceil(children.length / nColumns);